<%@ page import="com.sp.site.Comment" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="layout" content="main"/>
    <g:set var="entityName" value="${message(code: 'comment.label', default: 'Comment')}"/>
    <title><g:message code="default.show.label" args="[entityName]"/></title>
</head>

<body>
<div class="nav">
    <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a>
    </span>
</div>

<div class="body">
    <h1><g:message code="default.show.label" args="[entityName]"/></h1>
    <g:if test="${flash.message}">
        <div class="message">${flash.message}</div>
    </g:if>
    <div class="dialog">
        <table>
            <tbody>

            <tr class="prop">
                <td valign="top" class="name"><g:message code="comment.id.label" default="Id"/></td>

                <td valign="top" class="value">${fieldValue(bean: commentInstance, field: "id")}</td>

            </tr>

            <tr class="prop">
                <td valign="top" class="name"><g:message code="comment.name.label" default="Name"/></td>

                <td valign="top" class="value">${fieldValue(bean: commentInstance, field: "name")}</td>

            </tr>

            <tr class="prop">
                <td valign="top" class="name"><g:message code="comment.description.label" default="Description"/></td>

                <td valign="top" class="value">${fieldValue(bean: commentInstance, field: "description")}</td>

            </tr>

            <tr class="prop">
                <td valign="top" class="name"><g:message code="comment.content.label" default="Content"/></td>

                <td valign="top" class="value">${fieldValue(bean: commentInstance, field: "content")}</td>

            </tr>

            <tr class="prop">
                <td valign="top" class="name"><g:message code="comment.author.label" default="Author"/></td>

                <td valign="top" class="value"><g:link controller="user" action="show"
                                                       id="${commentInstance?.author?.id}">${commentInstance?.author?.encodeAsHTML()}</g:link></td>

            </tr>

            <tr class="prop">
                <td valign="top" class="name"><g:message code="comment.comment.label" default="Comment"/></td>

                <td valign="top" class="value"><g:link controller="comment" action="show"
                                                       id="${commentInstance?.comment?.id}">${commentInstance?.comment?.encodeAsHTML()}</g:link></td>

            </tr>

            <tr class="prop">
                <td valign="top" class="name"><g:message code="comment.comments.label" default="Comments"/></td>

                <td valign="top" style="text-align: left;" class="value">
                    <ul>
                        <g:each in="${commentInstance.comments}" var="c">
                            <li><g:link controller="comment" action="show"
                                        id="${c.id}">${c?.encodeAsHTML()}</g:link></li>
                        </g:each>
                    </ul>
                </td>

            </tr>

            <tr class="prop">
                <td valign="top" class="name"><g:message code="comment.dateCreated.label" default="Date Created"/></td>

                <td valign="top" class="value"><g:formatDate date="${commentInstance?.dateCreated}"/></td>

            </tr>

            <tr class="prop">
                <td valign="top" class="name"><g:message code="comment.lastUpdated.label" default="Last Updated"/></td>

                <td valign="top" class="value"><g:formatDate date="${commentInstance?.lastUpdated}"/></td>

            </tr>

            <tr class="prop">
                <td valign="top" class="name"><g:message code="comment.post.label" default="Post"/></td>

                <td valign="top" class="value"><g:link controller="post" action="show"
                                                       id="${commentInstance?.post?.id}">${commentInstance?.post?.encodeAsHTML()}</g:link></td>

            </tr>

            <tr class="prop">
                <td valign="top" class="name"><g:message code="comment.visible.label" default="Visible"/></td>

                <td valign="top" class="value"><g:formatBoolean boolean="${commentInstance?.visible}"/></td>

            </tr>

            </tbody>
        </table>
    </div>
</div>
</body>
</html>
